import Axios from "axios";

import {backstageUrl, baseUrl } from "./config.js"
import $ from  'jquery'
const echarts = require('echarts');

import schoolimg from "../img/school.png";
import grider from "../img/screenImg/管理员.png";

import stuimg from "../img/stu.png";
Axios.defaults.withCredentials = true;
//接口数据是parentId下子单位数据

//近30天隐患处理top5
export let getSafetysceneDealRateApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getSafetysceneDealRate", {
            params: {
                parent:parentId
            }
        })
    );
};
//近30天巡更巡检完成
export let getInspectAndPatrolCompleteInfoApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getInspectAndPatrolCompleteInfo", {
            params: {
                parent:parentId
            }
        })
    );
};
//

// 上周巡更巡检完成情况
export let getLatestInspectAndPatrolCompleteApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getLatestInspectAndPatrolComplete", {
            params: {
                parent:parentId
            }
        })
    );
};
//
export let getSafetysceneDistributedApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getSafetysceneDistributed", {
            params: {
                parent:parentId
            }
        })
    );
};
//
export let getAllSchoolSafetysceneInfoApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getAllSchoolSafetysceneInfo", {
            params: {
                parent:parentId
            }
        })
    );
};
//
export let getAllEducationBureauApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getAllEducationBureau", {
            params: {
                parent:parentId
            }
        })
    );
};

//
export let getAllCitySchoolScreenUrlApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getAllCitySchoolScreenUrl", {
            params: {
                parent:parentId
            }
        })
    );
};

//
export let getAllSchoolNumApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getAllSchoolNum", {
            params: {
                parent:parentId
            }
        })
    );
};

//待处理隐患事件
//
export let getSafetysceneForCityApi = (parentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getSafetysceneForCity", {
            params: {
                parent:parentId
            }
        })
    );
};


export let getOneEducationBureauApi = (departmentId) => {
    return (
        Axios.get(backstageUrl + "StatisticsForAllSchool/getOneEducationBureau", {
            params: {
                departmentId:departmentId
            }
        })
    );
};